const GiftList = [{
    name: '美女1号',
    icon: 'http://s3.mogucdn.com/mlcdn/c45406/170915_0a93207ci28kelh617k4hh62l65lb_640x960.jpg',
    left: '0',
    top: '0'
},
    {
        name: '美女2号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/171008_28ba9aade1cc95bjh1cfbb11c0ehi_640x960.jpg',
        left: '92px',
        top: '0'
    },
    {
        name: '美女3号',
        icon: 'http://s3.mogucdn.com/p2/161229/127390137_6586hlk5j6bbig04211hd228bigg1_640x960.jpg',
        left: '184px',
        top: '0'
    },
    {
        name: '美女4号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/171122_3iif31e4c52alljkdi5db60jk6ji9_640x960.jpg',
        left: '276px',
        top: '0'
    },
    {
        name: '美女5号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/181013_2h6g9elgch8g9fbb17l2ghahdbf19_640x854.jpg',
        left: '368px',
        top: '0'
    },
    {
        name: '美女6号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/180819_8050af3cfhi1lai0f6ihbl10c72c1_640x854.jpg',
        left: '460px',
        top: '0'
    },
    {
        name: '美女7号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/181019_0l7cjl6kac692179441hgee14c004_640x853.jpg',
        left: '460px',
        top: '92px'
    },
    {
        name: '美女8号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/181007_8678dj3i2ab7fi9l5ghgk30ij0180_640x854.jpg',
        left: '460px',
        top: '184px'
    },
    {
        name: '美女9号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/181012_62jd904ghjc0hihh334c3f9fe6jhd_640x854.jpg',
        left: '460px',
        top: '276px'
    },
    {
        name: '美女10号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/180925_46b5if0kh042fh774k296aijkhll2_640x854.jpg',
        left: '460px',
        top: '368px'
    },
    {
        name: '美女11号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/180828_1453j02208age06c38i43gk7bkfgd_640x854.jpg',
        left: '368px',
        top: '368px'
    },
    {
        name: '美女12号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/181014_00f508gf16c3dbl0af78kd4dj2371_640x854.jpg',
        left: '276px',
        top: '368px'
    },
    {
        name: '美女13号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/181018_465hba8ecif9lbfeid845eb3b344f_640x854.jpg',
        left: '184px',
        top: '368px'
    },
    {
        name: '美女14号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/180320_14hl7hd348057i55731khhl2bi29k_640x960.jpg',
        left: '92px',
        top: '368px'
    },
    {
        name: '美女15号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/180818_7c1563g3khflfjf6k3jc06g87k2j8_640x854.jpg',
        left: '0',
        top: '368px'
    },
    {
        name: '美女16号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/181008_4dc1fj3a5gie3cj60001h35icj2jl_640x854.jpg',
        left: '0',
        top: '276px'
    },
    {
        name: '美女17号',
        icon: 'http://s11.mogucdn.com/mlcdn/c45406/181017_467ec5j08ckgcajdc32jjalac8dl5_640x854.jpg',
        left: '0',
        top: '184px'
    },
    {
        name: '美女18号',
        icon: 'http://s3.mogucdn.com/mlcdn/c45406/180809_7ljbed5d78kflc7a07kfl8kfl8k91_640x854.jpg',
        left: '0',
        top: '92px'
    }
];

// random
function getRandomNum(min, max) {
    return Math.floor(Math.random() * (max - min + 1) + min);
}

// add props
for (let i = 0; i < GiftList.length; i++) {
    GiftList[i].id = i + 1;
    GiftList[i].count = getRandomNum(1, 10);
}

// out
function getGift(index) {
    if (index) {
        return GiftList[index];
    } else {
        return GiftList;
    }
}

// 转盘礼物
const TurnGifts = [
    {
        id: 1,
        name: 'Iphone11',
        icon: '/images/iphonex.png',
        rotate: 'rotate(0deg)'
    },
    {
        id: 2,
        name: '100元话费',
        icon: '/images/iphonex.png',
        rotate: 'rotate(45deg)'
    },
    {
        id: 3,
        name: '京东购物卡',
        icon: '/images/iphonex.png',
        rotate: 'rotate(90deg)'
    },
    {
        id: 4,
        name: '爱奇艺会员',
        icon: '/images/iphonex.png',
        rotate: 'rotate(135deg)'
    },
    {
        id: 5,
        name: '50元话费',
        icon: '/images/iphonex.png',
        rotate: 'rotate(180deg)'
    },
    {
        id: 6,
        name: '100购物积分',
        icon: '/images/iphonex.png',
        rotate: 'rotate(-135deg)'
    },
    {
        id: 7,
        name: '周大福钻戒',
        icon: '/images/iphonex.png',
        rotate: 'rotate(-90deg)'
    },
    {
        id: 8,
        name: '1年QQ会员',
        icon: '/images/iphonex.png',
        rotate: 'rotate(-45deg)'
    }
];

export {
    getGift,
    TurnGifts
};
